import unittest
import requests
from api.books import books_Api
from api.login import LoginApi
class TestLogin(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        login = LoginApi()
        session = requests.Session()
        r2 = login.login_test(session, "18688888100", "admin123")
        f1 = r2.json()["data"]["token"]
        cls.token = f1
        cls.booksAPI = books_Api()
    def setUp(self):
        self.session = requests.session()

    def tearDown(self):
        self.session.close()

    def test_01(self):
        r1 = self.booksAPI.books(self.session, self.token)
        r2 = r1.json()
